1. Field of the Invention
The present invention relates to security technology for a semiconductor device having a flash memory.
2. Description of the Related Art
FIG. 2 of the accompanying drawings illustrates a conventional nonvolatile semiconductor storage device disclosed in Japanese Patent Kokai (Laid-Open Publication) No. 2001-14871.
This nonvolatile semiconductor storage device 9 includes a flash memory main body 1, an information storage circuit 2, a command interface 3, a state machine 4, a data control circuit 5, a read circuit 6 and a tri-state buffer 7.
The flash memory main body 1 has three storage areas (blocks) for storing data, namely blocks (BLK) 1a, 1b, and 1c. The information storage circuit 2 includes three protect cells 2a to 2c for storing rewrite prohibition information for the blocks 1a to 1c, respectively. The information storage circuit 2 also includes a security cell 2d for storing read prohibition information. The command interface 3 determines reading, writing or erasing of data from, to or in the flash memory main body 1 and controls the state machine 4, on the basis of various control signals supplied from the outside.
When cancellation of the security function is instructed, the state machine 4 checks the protect cells 2a to 2c in the information storage circuit 2 to determine if the cells have been set to a rewrite prohibition state. If the cells are in the rewrite prohibition state, the state machine 4 disregards the protect setting to erase the data held in all of the blocks 1a to 1c in the flash memory main body 1.
The outputs of the blocks 1a to 1c of the flash memory main body 1 are connected to the tri-state buffer 7 via the read circuit 6. The data control circuit 5 controls the data output from the tri-state buffer 7 on the basis of control signals supplied from the outside and the contents (data) of the security cell 2d of the information storage circuit 2.
With this nonvolatile semiconductor storage device 9, it should be assumed now that the protection is set for all of the blocks 1a to 1c in the flash memory main body 1 by means of the protect cells 2a to 2c in the information storage circuit 2 in order to prevent the destruction of stored data by erroneous writing. Then, it should be assumed that the command interface 3 is instructed to cancel the security function.
When the cancellation instructions are sent to the state machine 4, the state machine 4 disregards the setting of the protection in the information storage circuit 2 and deletes the data held in all of the blocks 1a to 1c in the flash memory main body 1. Thus, even if a third party knows a method for canceling the security function, the third party cannot see or obtain the stored data, and therefore the third party is unable to read, decipher or falsify the stored data.
When accessing a block for which rewriting and reading are prohibited, however, the data of all the blocks 1a to 1c in the flash memory main body 1 is always erased by the state machine 4. If a microcomputer is designed to have this type of nonvolatile semiconductor storage device 9 and a CPU (central processing unit), the data in the block for which reading is prohibited cannot be read by the CPU.